<?php

class Kd_Data_Dcl_Expression_Where_Condition_Compare extends Kd_Data_Dcl_Expression_Where_Condition_Base {

    private $_left = NULL;
    private $_right = NULL;
    private $_flag = 'eq';

    public function  __construct($left = NULL, $right = NULL, $flag = 'eq') {
        parent::__construct();
        $this->setLeft($left)->setRight($right)->setFlag($flag);
    }

    public function getFlag(){
        return $this->_flag;
    }
    public function setFlag($value){
        $this->_flag = $value;
        return $this;
    }

    public function getLeft(){
        return $this->_left;
    }
    public function setLeft($value){
        $this->_left = is_string($value)? new Kd_Data_Dcl_Expression_Field($value):$value;
        return $this;
    }

    public function getRight(){
        return $this->_right;
    }
    public function setRight($value){
        $this->_right = $value;
        return $this;
    }

    public function getConditionType(){
        return 'compare';
    }
}